import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

//导入路由组件
import Home from '@/components/tabbar/Home'
import Member from '@/components/tabbar/Member'
import Shopcar from '@/components/tabbar/Shopcar'
import Search from '@/components/tabbar/Search'
import newsList from '@/components/news/newsList'
import newsInfo from '@/components/news/newsInfo'
import photoList from '@/components/photos/photoList'
import photoInfo from '@/components/photos/photoInfo'
import goodsList from '@/components/goods/goodsList'
import goodsInfo from '@/components/goods/goodsInfo'
import goodsDesc from '@/components/goods/goodsDesc'
import goodsComment from '@/components/goods/goodsComment'






export default new Router({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:Home},
    {path:'/member',component:Member},
    {path:'/shopcar',component:Shopcar},
    {path:'/search',component:Search},
    {path:'/home/newsList',component:newsList},
    {path:'/home/newsinfo/:id',component:newsInfo},
    {path:'/home/photoList',component:photoList},
    {path:'/home/photoinfo/:id',component:photoInfo},
    {path:'/home/goodsList',component:goodsList},
    {path:'/home/goodsInfo/:id',component:goodsInfo,name:'goodsinfo'},
    { path: '/goods/goodsdesc/:id', component: goodsDesc ,name:'goodsdesc'},
    { path: '/goods/goodscomment/:id', component: goodsComment ,name:'goodscomment'}
  ],
  linkActiveClass:'mui-active'
})
